The easiest way to leave is by plane from Horn Island to Cairns domestic airport. There are are some restrictions on what items you can take due to Australia's Quarantine laws.
Peddell's Ferries provides twice daily passenger transport by boat from Thursday Island to Seisia, Cape York. Check their website for up-to-date timetables and fares. Tickets can be booked online. Again, Australian Quarantine laws apply.